//
//  SHJudgeTools.h
//  YouTong
//
//  Created by chirui on 16/4/11.
//  Copyright © 2016年 chuirui_Shui. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SAMKeychain.h"

@interface SHJudgeTools : NSObject

//验证邮箱
+ (BOOL)validateEmail:(NSString *)email;

//验证手机
+ (NSString *)valiMobile:(NSString *)mobile;

//验证汽车
+ (BOOL)validateCarNo:(NSString *)carNo;

//验证用户名
+ (BOOL)validateUserName:(NSString *)name;

//验证密码
+ (BOOL)validatePassword:(NSString *)passWord;

//验证昵称
+ (BOOL)validateNickname:(NSString *)nickname;

//验证身份证
+ (BOOL)validateIdentityCard: (NSString *)identityCard;

//验证图片链接是否是缩略图
+ (BOOL)validateImageUrl:(NSString *)url;

//自定义正则
+ (BOOL)validCustomStr:(NSString *)str match:(NSString *)match;

//判断网络类型
+ (NSString *)netType;

/**
 *  传人时间戳
 *
 *  @param number 传人时间戳
 *  @return 返回字典：year年-month月-day天-hour时-minute分-second秒-week周几
 */
+ (NSDictionary *)getDateAction:(int)number;

+ (NSString *)base64StringFromText:(NSString *)text;
+ (NSString *)textFromBase64String:(NSString *)base64;
//把字符串加密成32位小写md5字符串
+ (NSString *)md532BitLower:(NSString *)inPutText;

//把字符串加密成32位大写md5字符串
+ (NSString *)md532BitUpper:(NSString*)inPutText;

+ (NSString *)secret:(NSString *)Str;

/**
 *  验证定位是否可用
 */
+(BOOL)valiLocationCanOrNo;
/**
 * 根据日期 判断星期
 */
+ (NSString*)weekdayStringFromDate:(NSDate*)inputDate;

+(void)MBProgressHUDPromptWith:(NSString *)str On:(UIView *)view; //MBP提示

//+(void)tokenOutDate:(int)code;  //验证token过期 暂时没用

+(NSDictionary *)deviceWANIPAdress; // 获取IP地址

+(NSString *)orderToNsstring:(NSString *)str; //字符串排序

/**
 * 划掉原价方法
 */
+(void)crossOutTheOriginalPrice:(NSString *)price onLabel:(UILabel *)label;

+(NSString *)getSha1String:(NSString *)srcString; //sha1加密
/**
 * 修改字符串中特殊子颜色大小
 */
+(NSMutableAttributedString*)changeAllStr:(NSString*)Allstr partStr:(NSString*)partStr color:(UIColor*)Color font:(NSInteger)Font;

/**
 * 时间戳转日期
 */

+(NSString *)ForTimeZeouStr:(NSString *)timeZeou;

/**
 * 时间戳转日期加时 分 秒
 */

+(NSString *)ForTimeZoneAndTimeStr:(NSString *)timeZeou;

/**
 * 时间戳转天日期
 */
+(NSString *)ForTimeZoneOnlyDay:(NSString *)timeZeou;

/**
 * 时间戳转月期
 */
+(NSString *)ForTimeZoneOnlyMonth:(NSString *)timeZeou;

/**
 * 时间戳转小时分钟
 */
+(NSString *)ForTimeZoneOnlyHourandMin:(NSString *)timeZeou;

//返回数据总条数
+(int)totailpageNumberForTotailNumber:(NSString *)numberStr;

+ (NSString *)getDeviceId;

@end
